Repository navigation
K2GO-451 fix(dashboard): rebuild status self-heals a crashed (dead-pid) running state - #634
Merged
Merged
Conversation
…d) running state A rebuild whose script is killed mid-build (box restart / power loss) cannot write a terminal status, so /rebuild/status reported 'running' forever and a new rebuild was refused with 409. The status read now checks pid liveness and heals a dead-pid 'running' to 'error' (clearing lock/phase/pid). The dead-pid check and state reset are shared with the cancel handler. dash-node 1.4.0.
… unit-test the decision Review follow-up. The status read and the new-rebuild guard now both go through readRebuildStatus(), which also heals a 'running' that has outlived a short grace with no pid ever recorded (the script died before, or without, writing one), not just a dead recorded pid. The heal decision moves to the pure, unit-tested resolveRebuildState. A running within the grace (just started) is left untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A rebuild whose script is killed mid-build (box restart / power loss) cannot
write a terminal status, so /rebuild/status reported 'running' forever and a new
rebuild was refused with 409. The status read now checks pid liveness and heals
a dead-pid 'running' to 'error', clearing lock/phase/pid, so the app sees a
normal failure instead of polling a phantom.
The dead-pid check and state reset move into shared helpers used by both the
status read and the cancel handler (one source). dash-node 1.4.0.
Verified: tsc --noEmit clean. The heal reuses the exact dead-pid check the
cancel handler already runs in production (used it to recover a wedged box this
session).